package com.cheyunkeji.er.utils;

import com.cheyun.netsalev3.MyApplication;

/**
 * Created by Michael on 2017/3/14 19:16.
 */

public class ScreenUtil {

    public static int getStatusBarHeight() {
        int statusBarHeight1 = -1;
        //获取status_bar_height资源的ID
        int resourceId = MyApplication.getInstance().getResources().getIdentifier("status_bar_height", "dimen", "android");
        if (resourceId > 0) {
            //根据资源ID获取响应的尺寸值
            statusBarHeight1 = MyApplication.getInstance().getResources().getDimensionPixelSize(resourceId);
        }
        return statusBarHeight1;
    }


}
